@import './base.css';

/* 全局样式重置和基础设置 */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #f5f7fa;
}

#app {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* 全局链接样式 */
a,
.green {
  text-decoration: none;
  color: #409EFF;
  transition: all 0.3s ease;
  padding: 3px;
  border-radius: 4px;
}

a:hover,
.green:hover {
  background-color: rgba(64, 158, 255, 0.1);
  color: #66b1ff;
}

/* 全局按钮样式增强 */
.el-button {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.el-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 全局卡片样式增强 */
.el-card {
  border-radius: 12px;
  border: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.el-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* 全局表格样式增强 */
.el-table {
  border-radius: 8px;
  overflow: hidden;
}

.el-table th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #495057;
  font-weight: 600;
}

/* 全局输入框样式增强 */
.el-input__wrapper {
  border-radius: 8px;
  transition: all 0.3s ease;
}

.el-input__wrapper:hover {
  box-shadow: 0 0 0 1px #409EFF inset;
}

.el-input__wrapper.is-focus {
  box-shadow: 0 0 0 1px #409EFF inset, 0 0 0 2px rgba(64, 158, 255, 0.2);
}

/* 全局对话框样式增强 */
.el-dialog {
  border-radius: 16px;
  overflow: hidden;
}

.el-dialog__header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 24px;
}

.el-dialog__title {
  color: white;
  font-weight: 600;
}

.el-dialog__headerbtn .el-dialog__close {
  color: white;
}

/* 全局消息提示样式增强 */
.el-message {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 全局菜单样式增强 */
.el-menu {
  border: none;
}

.el-menu-item {
  border-radius: 6px;
  margin: 2px 8px;
  transition: all 0.3s ease;
}

.el-menu-item:hover {
  background: rgba(64, 158, 255, 0.1);
}

.el-menu-item.is-active {
  background: linear-gradient(45deg, #409EFF, #67C23A);
  color: white;
}

/* 全局分页样式增强 */
.el-pagination {
  justify-content: center;
  margin-top: 20px;
}

.el-pagination .el-pager li {
  border-radius: 6px;
  transition: all 0.3s ease;
}

.el-pagination .el-pager li:hover {
  background: rgba(64, 158, 255, 0.1);
}

/* 全局加载样式 */
.el-loading-mask {
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, 0.8);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .el-button {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .el-card {
    margin: 8px;
  }
  
  .el-dialog {
    margin: 20px;
    width: calc(100% - 40px) !important;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 工具类 */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in-up {
  animation: slideInUp 0.6s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

/* 渐变背景工具类 */
.gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-success {
  background: linear-gradient(135deg, #67C23A 0%, #85ce61 100%);
}

.gradient-warning {
  background: linear-gradient(135deg, #E6A23C 0%, #ebb563 100%);
}

.gradient-danger {
  background: linear-gradient(135deg, #F56C6C 0%, #f78989 100%);
}

/* 阴影工具类 */
.shadow-sm {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.shadow-md {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 圆角工具类 */
.rounded-sm {
  border-radius: 4px;
}

.rounded-md {
  border-radius: 8px;
}

.rounded-lg {
  border-radius: 12px;
}

.rounded-xl {
  border-radius: 16px;
}
